@use "vars" as *;

// Based on Featherlight 1.7.14

.featherlight {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1000;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    background: #333;

    &:last-of-type {
        background: rgba(0, 0, 0, 0.8);
    }

    &:before {
        content: '';
        display: inline-block;
        height: 100%;
        vertical-align: middle;
    }

    .featherlight-content {
        position: relative;
        text-align: left;
        vertical-align: middle;
        display: inline-block;
        overflow: auto;
        padding: 10px 15px;
        border: 1px solid $color_primary25;
        border-radius: 10px;
        margin-left: 5%;
        margin-right: 5%;
        max-height: 85%;
        background: $color_pageBg;
        cursor: auto;
        white-space: normal;

        @media (max-width: 1024px) {
            padding: 10px;
            margin-left: 0;
            margin-right: 0;
            max-height: 98%;
        }
    }

    .featherlight-inner {
        display: block;
    }

    script.featherlight-inner, link.featherlight-inner, style.featherlight-inner {
        display: none;
    }

    .featherlight-close-icon {
        position: absolute;
        z-index: 9999;
        top: 0;
        right: 0;
        line-height: 25px;
        width: 25px;
        cursor: pointer;
        text-align: center;
        background: rgba($color_pageBg, 0.5);
        color: $color_primary100;
        border: none;
        padding: 0;
    }

    .featherlight-close-icon::-moz-focus-inner {
        border: 0;
        padding: 0;
    }

    .featherlight-image {
        width: 100%;
    }

    iframe {
        border: none;
    }
}

.featherlight-iframe .featherlight-content {
    border-bottom: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}
